<template>
	<view class="search-bar">
		<view class="input-box">
			<input :placeholder="text" placeholder-class="input-text" :adjust-position="false" @input="input"/>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			text:{
				type:String,
				default(){
					return "在此处搜索"
				}
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			input(v){
				this.$emit("input",v.detail.value)
			}
		}
	}
</script>

<style lang="scss">
	.search-bar {
		display: flex;
		flex-direction: row;
		justify-content: center;
	
		.input-box {
			width: 75%;
			border: 1px solid $my-huise-2;
			border-radius: 10px;
			overflow: hidden;
			input {
				position: relative;
				left: 5px;
				.input-text{
					color:$my-huise-2;
				}
			}
		}
	}
</style>
